#By the logic of game theory, the hunter should always slack off, that is, not hunt.
#However, when offered an award for cooperation, in the long run, I believe that the
#hunter will accrue a greater amount of food from cooperating with their fellow hunters,
#rather than slacking off. With this in mind, the first choice my code considers is
#whether or not the bonus from hunting will be worth the risk.

def hunt_choices(round_number, current_food, current_reputation, m,  player_reputations):
    
 NumOfPlayers=len(player_reputations) #Since we are not given the current number of players,
                                      #we calculate it by finding the length of the array
                                      #of player reputations, which we are given.
 
 value=float(NumOfPlayers) 
 m=float(m)
 HuntBonus=m/value                    #This segment of code calculates the proportion of 
                                      #hunters needed in order for all hunters to receive
                                      #a bonus.                                  
                                                             
 hunt_decisions=[NumOfPlayers]
 
 for x in range (0, NumOfPlayers):
   if HuntBonus<=0.5:                 #As stated at the beginning, I believe that it is
                                      #in one's best interest to go hunting. However, if
                                      #the necessary proportion of people going hunting is
                                      #so high that it is unlikely to be reached, then I
                                      #fall back on the game theory logic that it is better
                                      #to slack off than to hunt when no award is given out.

                                      #If less then 50% of people are required to go hunting
                                      #in order to receive a bonus, it is likely that more
                                      #people will choose to hunt, and thus there is a good
                                      #liklihood that I will be among those who receive the
                                      #award.
     hunt_decisions[x]='h'
   else:
       if current_food<300:           #If my food supplies run short, it is in my best interest
                                      #to slack, because slackers lose food at a slower pace
                                      #than do hunters. Specifically, when two people hunt
                                      #together, at the end of the day, each gains zero food.
                                      #When one person hunts and the other slacks, at the end
                                      #of the day, the hunter loses three units of food and the
                                      #slacker gains one. When both hunters choose to slack, at
                                      #the end of the day, they each lose two units of food.
                                      #
                                      #So, at the end of the day, a hunter could either receive
                                      #+0 food or -3 food, while a slacker could either receive
                                      #+1 food or -2 food. Since a slacker, on average, loses
                                      #0.5 units of food per round (the average of -1 and 2) and
                                      #a hunter, on average, loses 1.5 units of food per round,
                                      #it is better to slack when your food supplies are low.
                                      #Given the large number of initial food "300(P-1)," I
                                      #reason that 300 is a fair number to revert to slacking at,
                                      #since slacking might be my ticket to the next day.
           hunt_decisions[x]='s'
       else:
           if player_reputations[x]>=0.8:#If someone for whatever reason decides to hunt a
                                         #majority of the time, which I reason would be about
                                         #80% or more of the time, the logical thing to do
                                         #would be to take advantage of their incessant 
                                         #hunting, and slack off, thus receiving a net gain
                                         #of 1 unit of food, while they suffer a loss of 3.
             hunt_decisions[x]='s'
           if player_reputations[x]<0.34:#On the other hand, if a person refuses to hunt, which
                                         #would be the optimal strategy if no reward for
                                         #cooperation were offered, then I too will slack off.
                                         #It is better to suffer a loss of 2 units of food then
                                         #to lose 3 and simultaneously let your fellow hunter
                                         #slash opponent gain 1. I figure roughly one third
                                         #of hunters will not be tempted by the possible award,
                                         #I will lose minimal units of food on hunters who
                                         #refuse to hunt.
              hunt_decisions[x]='s'
           else:
              hunt_decisions[x]='h'   #The above two cases account for slightly more than half
                                      #(55%) of the possible player reputations that can occur
                                      #in this competition. If either of them is not satisfied
                                      #by someone's player reputation I will choose to hunt.
                                      #The most likely outcome is that both I and my hunting
                                      #partner will gain zero food units, that is, we will both
                                      #hunt. If the other hunter chooses to slack off I will
                                      #lose 3 units of food and they will gain 1, but I will
                                      #also be given a chance to receive an award that my
                                      #hunting partner will not get. Sometimes you have to take
                                      #chances, and this is one I am willing to make.
                                      

 return hunt_decisions 

def hunt_outcomes(food_earnings):
   pass                             #I choose to modify nothing.
def round_end(award, m, number_hunters):
   pass                             #Again, I choose to modify nothing.


